// Copyright © SixtyFPS GmbH <info@slint-ui.com>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial

// This tests that constant property from global are properly initialized

global Glob := {
    property <int> a: 3;
    property <int> b: a + 3;
}

global Glob2 := {
    property <int> a: other;
    property <int> other: 5;
}

TestCase := Rectangle {
    r := Rectangle {
        property <int> value1: Glob.b;
        property <int> value2: true ? Glob2.a : 88;
    }
    property <bool> test: r.value1 + r.value2 == 3+3 +5;
}

/*
```rust
let instance = TestCase::new().unwrap();
assert!(instance.get_test());
```

```cpp
auto handle = TestCase::create();
const TestCase &instance = *handle;
assert(instance.get_test());
```

```js
let instance = new slint.TestCase({});
assert(instance.test);
```

*/
